package sun.xi;

public class Person {
    private String name;
    private String sex;
    private int age;
    public String getName()
    {
     return name;
    }
    public String getSex()
    {
        return sex;
    }
    public int getAge()
    {
        return age;
    }
    public void setName(String name)
    {
        this.name=name;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }
    public Person()
    {
        System.out.println("Person类空的构造方法运行了。");
    }
    public Person(String name,int age){
        this.name=name;
        this.age=age;
        Person a=new Person();
        System.out.println("Person类带有两个参数的构造方法运行了。");
    }
    public Person(String name,String sex,int age)
    {
        this.name=name;
        this.sex=sex;
        this.age=age;
        Person b=new Person("小张",21);
        System.out.println("Person类带有三个参数的构造方法运行了。");
    }
    public void shoeInfo()
    {
        System.out.println("姓名："+name+",性别："+sex+",年龄："+age);
    }
}
